import { useLocation, useNavigate ,useParams} from "react-router-dom"

export const withNavigation = (Component)=>{
    return (props) => <Component {...props} navigate={useNavigate()} params = {useParams()}
    loaction= {useLocation()}></Component>
}